package com.yeqian.service;

import com.yeqian.mapper.ArticleMapper;
import com.yeqian.mapper.CommentMapper;
import com.yeqian.mapper.TagMapper;
import com.yeqian.mapper.AdminMapper;
import com.yeqian.utils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author : yeqian
 * @Date : 2020/12/24 22:58
 * 业务层的基类，所有业务层接口的实现类都需要继承此类
 * <p>
 * <p>
 * 虽然 @Transactional 注解可以作用于接口、接口方法、类以及类方法上
 * 但是 Spring 建议不要在接口或者接口方法上使用该注解，因为这只有在使用基于接口的代理时它才会生效。
 */
public class BaseService {

    @Autowired
    protected ArticleMapper articleMapper;
    @Autowired
    protected AdminMapper userMapper;
    @Autowired
    protected TagMapper tagMapper;
    @Autowired
    protected AdminMapper adminMapper;
    @Autowired
    protected RedisUtil redisUtil;
    @Autowired
    protected CommentMapper commentMapper;
}
